import socket

sk = socket.socket()
sk.connect(('127.0.0.0', 8081))

while True:
    send_data = input("请输入你要发送的内容：")
    sk.send(send_data.encode("utf-8"))
    # 等待服务器响应
    accept_data = sk.recv(1024)
    print("接收到服务器的响应：",accept_data.decode("utf-8"))